{{define "infoCollection/pastMedicalHistory_tnb.html"}}
<div class="box box-info" style="box-shadow: none;margin-bottom: 0;">
    <div class="box-header with-border">
        <h3 class="box-title">糖尿病</h3>
    </div>
    <div class="box-body">
        <div class="form-group">
            <label class="control-label col-sm-3">
                是否有糖尿病病史:
            </label>
            <div class="radio col-sm-9">
                <input type="radio" name="tnb" value="无" class="minimal" checked>&nbsp;&nbsp;无
                <input type="radio" name="tnb" value="有" class="minimal">&nbsp;&nbsp;有
            </div>
        </div>
        <div class="form-group" id="tnb_shouciquezhenshijian_div" style="display: none;">
            <label class="control-label col-sm-3"><span
                    style="color: red;font-weight: bold;">糖尿病确诊时间:</span></label>
            <div class="col-sm-3"><input class="form-control" type="text" id="tnb_shouciquezhenshijian"
                                         name="tnb_shouciquezhenshijian" placeholder="XXXX年"/>
            </div>
            <br>
            <br>

            <label class="control-label col-sm-3"><span
                    style="color: red;font-weight: bold;">是否服用降糖药:</span></label>
            <div class="radio col-sm-3">
                <input type="radio" name="tnb_is_fuyao" value="否" class="minimal">&nbsp;&nbsp;否&nbsp;
                <input type="radio" name="tnb_is_fuyao" value="是" class="minimal">&nbsp;&nbsp;是&nbsp;
            </div>
        </div>
        <div class="form-group" id="tnb_yongyao_pinzhong" style="display: none;">
            <label class="control-label col-sm-3"><span
                    style="color: red;font-weight: bold;">用药品种:</span></label>
            <div class="checkbox col-sm-9">
                <input type="checkbox" name="tnb_yongyao_pinzhong" value="口服降糖药" class="minimal">&nbsp;&nbsp;口服降糖药&nbsp;
                <input type="checkbox" name="tnb_yongyao_pinzhong" value="胰岛素" class="minimal">&nbsp;&nbsp;胰岛素&nbsp;
                <input type="checkbox" name="tnb_yongyao_pinzhong" value="其他" class="minimal">&nbsp;&nbsp;其他&nbsp;
            </div>
        </div>

        <div class="form-group" id="tnb_kongzhiqingk">
            <label class="control-label col-sm-3"><span>血糖控制情况:</span></label>
            <div class="radio col-sm-9">
                <input type="radio" name="tnb_kongzhiqingk" value="达标" class="minimal">&nbsp;&nbsp;达标&nbsp;
                <input type="radio" name="tnb_kongzhiqingk" value="不达标" class="minimal">&nbsp;&nbsp;不达标&nbsp;
                <input type="radio" name="tnb_kongzhiqingk" value="不清楚" class="minimal">&nbsp;&nbsp;不清楚&nbsp;
            </div>
        </div>

    </div>
</div>
        <script>
            $(function () {
                tnbDeal();
            });


            function tnbDeal() {
                $("input:radio[name='tnb']").on('ifChanged', function (event) {
                    if ($(this).is(':checked')) {
                        if ($(this).val() == "有") {
                            $("#tnb_shouciquezhenshijian_div").show();
                        } else {
                            $("#tnb_shouciquezhenshijian_div").hide();
                            $("#tnb_yongyao_pinzhong").hide();
                            $("input:radio[name='tnb_is_fuyao']").iCheck('uncheck');
                            $("input:checkbox[name='tnb_yongyao_pinzhong']").iCheck('uncheck');
                            $("#tnb_shouciquezhenshijian").val("");
                        }
                    }
                });
                $("input:radio[name='tnb_is_fuyao']").on('ifChanged', function (event) {
                    if ($(this).is(':checked')) {
                        if ($(this).val() == "是") {
                            $("#tnb_yongyao_pinzhong").show();
                        } else {
                            $("#tnb_yongyao_pinzhong").hide();
                            $("input:checkbox[name='tnb_yongyao_pinzhong']").iCheck('uncheck');
                        }
                    }
                });
            }
        </script>
{{end}}